facexy

 

facexy is a command for turtles that sets the turtle’s heading towards the point (x,y). The syntax of this command is facexy [number number]. For example: ask turtle 1 [facexy 2 3] This asks turtle 1 to face towards the point 2,3. Note: that if the turtle is on the point (x,y), then the turtle's heading won't change.

 

Try it Yourself

 
 
 
 
 
 
 

What's next?

Once you mastered the facexy primitive, don't stop there. Check out the resources below to improve your NetLogo skills.

 
Similar primitives:
face

Turn to face a specific agent.

Read more
setxy

set the position of a turtle (in terms of X and Y coordinates)

Read more
towards

Reports the angle of the caller towards an agent.

Read more
 
Learn another primitive